package com.gitee.wsl.mathematics.geometry.d2.api

import com.gitee.wsl.mathematics.coordinate.d2.Coordinate2
import com.gitee.wsl.mathematics.geometry.api.op.Scalable

interface Scalable2<T:Number,V: Coordinate2<T, V>>:Scalable<T,V>{
    /**
     * Creates a new shape with dimensions scaled by [xScale] and [yScale].
     *
     * @param xScale the x scale factor
     * @param yScale the y scale factor
     * @param uAnchor x coordinate of the scaling anchor in u parameter space, default is 0.5 (center)
     * @param vAnchor y coordinate of the scaling anchor in v parameter space, default is 0.5 (center)
     */
    fun scaledBy(xScale: T, yScale: T, uAnchor: Double = 0.5, vAnchor: Double = 0.5)

    /** Creates a new shape at the same position with the given dimensions. */
    fun scaledTo(width: T, height: T)
}